package com.riant.day04.demo2;

import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;

/**
 * @Classname Test5
 * @Description TODO
 * @Date 2021/3/12 0:26
 * @Created by 张斌
 */
public class Test5 {
    public static void main(String[] args) {
        List<String> list=new LinkedList<>();
        list.add("aaa");
        list.add("bbb");
        list.add("abc");
        System.out.println(Arrays.toString(list.toArray()));
        list.sort(new MyCompator());
        System.out.println(Arrays.toString(list.toArray()));
        Collections.reverse(list);
        System.out.println(Arrays.toString(list.toArray()));

    }
}
